Home |
| Latest | About | Random
# Week 5 Thursday. ## Properties of delta function. - Recall we define the delta "function" to be $\delta(x)$ such that $$ \delta(x) = \begin{cases} 0 & \text{if } x \neq 0 \\ `\infty' & \text{if } x = 0 \end{cases} $$It is a density function where it is "infinitely dense" at position $x=0$, so there is a peak at $x=0$. Of course we can also translate it to be $\delta(x-a)$, then it has a peak at $x=a$. - The total integral however is 1, that is $$ \int_{-\infty}^{\infty} \delta(x) dx = 1 $$ - And in general, if we integrate the delta function over an interval $I$, then it depends on whether the interval $I$ contains the peak of delta: $$ \int_{I} \delta(x-a)dx = \begin{cases} 0 & \text{if } a \notin I \\ 1 & \text{if } a \in I \end{cases} $$ - More generally, delta function is also a value picker, when you integrate it against another function $f(x)$: $$ \int_{I} \delta(x-a)f(x) dx = \begin{cases} 0 & \text{if } x \notin I \\ f(a) & \text{if } x \in I \end{cases} $$ - So for example: - We have $\int_{3}^{5} \delta(x-2)\sin(x)dx = 0$ because the interval of integration does not contain $x=2$. - We have $\int_{3}^{5}\delta(x-4)\sin(x) dx=\sin(4)$ because the interval of integration contains $4$. - We also have $\int_{3}^{5}\delta(x-3)\sin(x)dx=\sin(3)$, since $3$ is at the boundary of the interval of integration. - So delta function really is a function that makes sense when it is integrated. - What about the Laplace transform of the delta function? We have $$ {\mathscr L}[\delta(x)](p) = \int_{x=0}^{\infty} e^{-px} \delta(x)dx = e^{-p(0)}=1. $$ - This is neat, since we haven't seen a function whose Laplace transform is a constant! In fact, this can be taken as a motivation for the delta "function" -- it is whatever mathematical gadget that we need to invent in order to have a Laplace transform of $1$. - This is akin to "negative numbers" and "imaginary numbers". We needed to invent negative numbers in order to answer the question "how many buffalo do we need to add to five buffalos to get three buffalos". And we needed to invent the complex numbers to answer the question "what number would have a square that is $-1$?". - So we can play the same game here -- What function or thing do we need so that ${\mathscr L}[f](p)=1$ ? Well by inventing $\delta(x)$ as we had, we would have ${\mathscr L}[\delta(x)](p) = 1$! - In general, we have $$ {\mathscr L}[\delta(x-a)](p) = \int_{x=0}^{\infty} e^{-px} \delta(x-a)dx =e^{-pa}, $$provided that $a \ge 0$. - Let us see an example. Let us compare the following two differential equations (A) and (B). - (A) $y'+y=0$, $y(0)=0$. We can solve this directly using our previous method, where auxiliary equation is $r+1=0$, and $r=-1$. So we have $y=Ce^{-x}$. And with the initial condition $y(0)=0=Ce^{0}$, we see that $C=0$. So the solution is $y=0$. - (B) $y'+y=4\delta(x-7)$, $y(0)=0$. In this one, it's not clear how one would use our old method to solve. So we will use Laplace to help us. Write $Y = {\mathscr L}[y]$, and apply Laplace transform to both sides and we get $-y(0)+pY+Y=4e^{-7p}$. Using the initial value we have $(1+p)Y=4e^{-7p}$, or $Y = \frac{4e^{-7p}}{p+1}$. Note this is an exponential shift!, so we have $Y=4e^{-7p} \frac{1}{p+1}=4 e^{-7p}{\mathscr L}[e^{-x}](p)=4 {\mathscr L}[e^{-(x-7)}u(x-7)](p)$. This shows $y(x)=4 e^{-(x-7)}u(x-7)$. This is an exponential decay that starts at $x=7$, while being zero when $x < 7$. - The two scenarios both describe the same system with same initial condition, except in (B) the driving term is "4 unit of something applied instantaneously at $x=7$". The result is that in (A), nothing happens, but in (B) nothing happens until at $x=7$, then it jumps up to $y=4$ and decays back down. ## Comparison of generating function and Laplace transform. We have seen two types of "transforms" where we transform an unknown object satisfying some equation to a new one, solving the new one by algebra, and then interpreting what the old object is, namely generating functions and Laplace transform. Let us compare the two. | Discrete world | Continuous world | |------------------------------------------------------|--------------------------------------------------------------- | | A sequence $(a_{n})_{n=0}^{\infty}$ | A function $y(x)$ on $[0,\infty)$ | | $(a_{n})$ satisfies some difference equation | $y(x)$ satisfies some differential equation | | Transform $(a_{n})$ to its generating function $A$ | Transform $y(x)$ to its Laplace transform $Y$ | | where $A=\sum_{n=0}^{\infty} a_{n} x^{n}$ | where $Y={\mathscr L}[y](x)=\int_{x=0}^{\infty} e^{-px}y(x)dx$ | | Old variable $n$, new variable $x$ | Old variable $x$, new variable $p$ | | We perform algebra to solve for $A$ | We perform algebra to solve for $Y$ | | We have to interpret to figure out what $(a_{n})$ is | We have to interpret to figure out what $y(x)$ is | Now take a look at the similarity when we perform the transform in each: $$ \begin{array}{} {\color{purple}A} = {\color{orange}\sum_{n=0}^{\infty}} {\color{blue}a_{n}} {\color{green}x^{n}} & {\color{purple}Y} = {\color{orange}\int_{x}^{\infty}} {\color{green}e^{-px}}{\color{blue}y(x)} dx \end{array} $$ In the generating function case we are summing the terms of our sequence $a_{n}$ multiplied against $x^{n}$ (a variable change gadget), ranging from $n=0$ to $\infty$. In the Laplace transform case we are integrating the function $y(x)$, multiplied against $e^{-px}$ (a variable change gadget), ranging from $x = 0$ to $\infty$. In the generating function case, the variable change object $x^{n}$ can be re-written as $x^{n} = e^{n\ln(x)}$. So we see that $\ln(x)$ is analogous to the $-p$ in Laplace transform! Now that we see there is some similarities between generating functions and Laplace transform, let us examine what happens when we multiply two generating functions together. Take $A(x) = \sum_{n=0}^{\infty} a_{n} x^{n}$ and $B(x) = \sum_{n=0}^{\infty} b_{n}x^{n}$ to be two generating functions. Suppose $C(x)=A(x)B(x)$, and $C(x) = \sum_{n=0}^{\infty} c_{n}x^{n}$ is also a generating function. What can we say about the coefficient $c_{n}$ in terms of $a_{n}$ and $b_{n}$ ? Let us multiple it out and find out. We will do so by expanding out $A(x)$ and $B(x)$ and collect like terms: $$ \begin{align*} A(x)B(x) & = (a_{0}+ a_{1}x + a_{2}x^{2}+a_{3}x^{3} + \cdots) (b_{0}+ b_{1}x + b_{2}x^{2}+b_{3}x^{3} + \cdots) \\ &=a_{0}b_{0} + (a_{0}b_{1}+a_{1}b_{0}) x + (a_{0}b_{2}+a_{1}b_{1}+a_{2}b_{0})x^{2} + \\ & \quad\quad\quad+(a_{0}b_{3}+a_{1}b_{2}+a_{2}b_{1}+a_{3}b_{0})x^{3} + \cdots \\ &=\sum_{n=0}^{\infty} \left( \sum_{t=0}^{n} a_{t}b_{n-t} \right) x^{n} \end{align*} $$ Interesting! Observe that if $C(x) = A(x)B(x) = \sum_{n=0}^{\infty} c_{n}x^{n}$, then $c_{n} = \sum_{t=0}^{n} a_{t}b_{n-t}$. We can define this to be the **convolution** of the two sequences $(a_{n})$ and $(b_{n})$, where $$ (a_{n} \ast b_{n})_{n} = \sum_{t=0}^{n} a_{t}b_{n-t}. $$In other words, the convolution of the two sequences here is just the coefficients of the products of their transforms. In other words, $a_{n} \ast b_{n}$ is the coefficient of the generating function that is the product of the generating functions of $a_{n}$ and $b_{n}$. We will use this to inspire the definition of convolution for functions. ## Convolution and convolution theorem. Take functions $f(x)$ and $g(x)$, define their **convolution** $f \ast g$ to be a function such that $$ (f \ast g)(x) = \int_{t=0}^{x}f(t)g(x-t)dt. $$Note the similarity with the convolution in the discrete case! In some sense, the convolution $f \ast g$ is a "blend" of the function $f$ and $g$. But as we will see more precisely that $f\ast g$ is the function whose Laplace transform is the product of the Laplace transforms of $f$ and $g$. This is called the **convolution theorem**. But before we get to that, let us just see some examples of calculating convolutions of functions. Example. What is $0 \ast f$? Let us find out: $$ (0 \ast f)(x) = \int_{t=0}^{x} 0\cdot f(x-t)dt = 0 $$Great! The convolution of $0$ with any function is $0$. Example. What is $1 \ast 1$? Here $1$ is the constant function. Let us see: $$ (1 \ast 1)(x) = \int_{t=0}^{x} 1 \cdot1 dt = t \Big|_{t= 0 }^{x} = x. $$ Example. What is $1 \ast x$? Let's calculate $$ (1 \ast x)(x) = \int_{t=0}^{x} 1 (x-t)dt = xt - \frac{t^{2}}{2} \Big|_{t=0}^{x} = \frac{x^{2}}{2}. $$ Example. What is $x \ast x$? We calculate $$ (x\ast x)(x) = \int_{t=0}^{x} t (x-t)dt = \frac{xt^{2}}{2}-\frac{t^{3}}{3}\Big|_{t=0}^{x}= \frac{x^{3}}{6}. $$ Ok, now we might ask, what is $x^{10} \ast x^{8}$? We could integrate it but let us do it by using our main result. > **Convolution theorem. (CT)** Let $f$ and $g$ be reasonable functions. Then $$ {\mathscr L}[f \ast g](p) = {\mathscr L}[f](p) {\mathscr L}[g](p). $$That is, the product of the Laplace transforms is the Laplace transform of the convolution. Let us try using the convolution theorem to figure out what $x^{10}\ast x^{8}$ is. Example. To find $x^{10} \ast x^{8}$, let us consider instead their Laplace transform: $$ \begin{align*} {\mathscr L}[x^{10} \ast x^{8}] (p) &\stackrel{CT}{=} {\mathscr L}[x^{10}](p) {\mathscr L}[x^{8}](p) \\ &= \frac{10!}{p^{11}} \frac{8!}{p^{9}} \\ &= \frac{10! 8!}{19!} \frac{19!}{p^{20}} \\ &= \frac{10! 8!}{19!} {\mathscr L}[x^{19}](p) \\ &= {\mathscr L} \left[ \frac{10!8!}{19!}x^{19} \right](p) \end{align*} $$Hence we see that $x^{10} \ast x^{8} = \frac{10!8!}{19!} x^{19}$. Example. Find a function $f$ such that ${\mathscr L}[f](p) = \frac{1}{(p^{2}+1)^{2}}$. Note that $\frac{1}{(p^{2}+1)^{2}} = \frac{1}{p^{2}+1} \frac{1}{p^{2}+1} = {\mathscr L}[\sin(x)](p) {\mathscr L}[\sin(x)](p) = {\mathscr L}[\sin(x) \ast \sin(x)](p)$ by convolution theorem. So $f = \sin(x) \ast \sin(x)$. But what is this function? Let us work it out. $$ \begin{align*} \sin(x) \ast \sin(x) &= \int_{t=0}^{x} \sin(t) \sin(x-t)dt \\ & = \frac{1}{2}\int_{t=0}^{x} \cos(t-(x-t))-\cos(t+x-t) dt \\ &= \frac{1}{2} \int_{t=0}^{x} \cos(2t-x) - \cos(x) dt \\ &= \frac{1}{2} \left( \frac{1}{2} \sin(2t-x) - t \cos(x) \right)_{t=0}^{x} \\ &= \frac{1}{2} \left( \frac{1}{2} \sin(2x-x) - x\cos(x) - \frac{1}{2} \sin(-x) \right) \\ &=\frac{1}{2} \sin(x)- \frac{1}{2} x\cos(x). \end{align*} $$ Note above we used the **prosthaphaeresis** trigonometric identity $\sin(A)\sin(B) = \frac{1}{2}(\cos(A-B)-\cos(A+B))$.